local global = require "global"
local plugin_loader = require "plugin_loader"

local function setOption()
  for option, val in pairs(global.options) do
    vim.o[option] = val
  end
end

local function setMapping()
  vim.g.mapleader = " "
  vim.api.nvim_set_keymap('n', ' ', '', { noremap = true })
  vim.api.nvim_set_keymap('x', ' ', '', { noremap = true })
  vim.api.nvim_set_keymap('n','<leader>fs',':w<cr>', {noremap=true})
  vim.api.nvim_set_keymap('n','<leader>qq',':q<cr>', {noremap=true})
end

local function load()
  plugin_loader:init()
  setOption()
  setMapping()

  vim.cmd [[colorscheme edge]]
end

load()

